home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d16 / wincomm5.arc / VT102.WMS < prev    next >
Text File  |  1990-10-25  |  2KB  |  61 lines

  1. ;Playback of VT102 files demo
  2.  
  3. USERWINDOW(5,0,0,12632256)
  4. METABKG(0,0,1,"synapp.wmf")       ;displays the SYNAPPSYS logo
  5. show(6)
  6. STOP                              ;stops the session if it is started                  
  7. len = 2
  8. GOSUB pause
  9. DIALOGBOX 50,50,229,60,21,"VT 102 Demonstration"
  10.         LTEXT 8,8,224,37,"This part of the demonstration will replay a file that contains VT102 escape sequences.  The file is VT102.EMU."
  11.         DEFCANCELBUTTON 90,42,50,15,"&OK"
  12. DEND
  13. dtime = 10
  14. gosub delay
  15.  
  16. open("VT102.WSF","",1)        ;opens the session file setup with VT102 terminal type selected
  17. len = 2
  18. DELOBJECT(0,0,0)              ;clears the graphic
  19. show(8)
  20. key1 = 0
  21. key = 38
  22.  
  23.  
  24. len = 1
  25. sendspeckey(1,0,asc("F"))     ; 1 == alt key, selects the FILE menu
  26. gosub pause
  27. sendspeckey(0,0,asc("Y"))     ; selects the Playback menu item
  28. gosub pause
  29. sendspeckey(0,0,asc("V"))     ; types VT102.EMU in the edit box
  30. sendspeckey(0,0,asc("T"))
  31. sendspeckey(0,0,asc("1"))
  32. sendspeckey(0,0,asc("0"))
  33. sendspeckey(0,0,asc("2"))
  34. sendspeckey(0,0,110)
  35. sendspeckey(0,0,asc("E"))
  36. sendspeckey(0,0,asc("M"))
  37. sendspeckey(0,0,asc("U"))
  38. gosub pause
  39. sendspeckey(0,0,13)           ; send carrage return
  40. HALT
  41.  
  42. pause:
  43. i = time?+len
  44. while(time? <i)
  45. wend
  46. return
  47.  
  48.  
  49. delay:                          ;automatically destroys the dialog box by 
  50. i = time?+dtime                 ;sending a carrage return after a timeout
  51. j = 255                         ;if the CONTINUE button is not selected beforehand
  52. while((time?<i) && (j == 255))
  53. j = DIALOG?
  54. wend
  55. if(j == 255)
  56.   sendspeckey(0,0,13)
  57. return
  58.  
  59. end
  60.  
  61.